/* 基础样式 */
:root {
    --primary-color: #0084ff;
    --secondary-color: #f0f2f5;
    --text-color: #050505;
    --text-secondary: #65676b;
    --bg-color: #ffffff;
    --sidebar-bg: #f8f9fa;
    --message-received: #f0f2f5;
    --message-sent: #0084ff;
    --message-sent-text: #ffffff;
    --border-color: #dddfe2;
    --danger-color: #ff4d4f;
    --online-color: #31a24c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--secondary-color);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
}

/* 按钮样式 */
.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.btn-action {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-action:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-action.danger {
    color: var(--danger-color);
}

.btn-action.danger:hover {
    background-color: rgba(255, 77, 79, 0.1);
}

.btn-send {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-send:hover {
    background-color: #0073e6;
}

.btn-more {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

/* 头像样式 */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 聊天应用布局 */
.chat-app {
    display: flex;
    height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    background-color: var(--bg-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar {
    width: 350px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.main-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.info-sidebar {
    width: 300px;
    background-color: var(--bg-color);
    border-left: 1px solid var(--border-color);
    display: none;
}

/* 侧边栏样式 */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.search-box {
    position: relative;
    padding: 10px 16px;
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border-radius: 20px;
    border: none;
    background-color: var(--bg-color);
    font-size: 14px;
}

.search-box i {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 14px;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.chat-item {
    width: 99%;
    display: flex;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.chat-item.active {
    background-color: var(--secondary-color);
}

.chat-info {
    flex: 1;
    margin-left: 12px;
    overflow: hidden;
}

.chat-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-info p {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 8px;
}

.chat-meta .time {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.chat-meta .badge {
    background-color: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* 主聊天区样式 */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.header-left {
    display: flex;
    align-items: center;
}

.chat-title {
    margin-left: 12px;
}

.chat-title h3 {
    font-size: 16px;
    font-weight: 600;
}

.chat-title p {
    font-size: 13px;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    gap: 8px;
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: var(--bg-color);
    background-image: url('');
    background-repeat: repeat;
}

.message-date {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin: 16px 0;
    position: relative;
}

.message-date::before,
.message-date::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background-color: var(--border-color);
}

.message-date::before {
    left: 0;
}

.message-date::after {
    right: 0;
}

.message {
    display: flex;
    margin-bottom: 16px;
    position: relative;
}

.message.received {
    justify-content: flex-start;
}

.message.sent {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    position: relative;
}

.message.received .message-content {
    margin-left: 12px;
}

.message.sent .message-content {
    margin-right: 12px;
}

.message-info {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.message.received .message-info {
    justify-content: flex-start;
}

.message.sent .message-info {
    justify-content: flex-end;
}

.sender {
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
}

.time {
    font-size: 11px;
    color: var(--text-secondary);
}

.message-text {
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.received .message-text {
    background-color: var(--message-received);
    border-top-left-radius: 0;
}

.message.sent .message-text {
    background-color: var(--message-sent);
    color: var(--message-sent-text);
    border-top-right-radius: 0;
}

.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.message-image:hover {
    opacity: 0.9;
}

.message-status {
    position: absolute;
    right: -20px;
    bottom: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.message-actions {
    display: none;
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--bg-color);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 4px;
    z-index: 1;
}

.message:hover .message-actions {
    display: flex;
}

/* 输入框样式 */
.chat-input {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.input-tools {
    display: flex;
    margin-right: 12px;
}

.input-box {
    flex: 1;
    position: relative;
}

.input-box input {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border-radius: 20px;
    border: none;
    background-color: var(--secondary-color);
    font-size: 15px;
}

.input-box #voice-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* 信息侧边栏样式 */
.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.info-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.group-info {
    padding: 16px;
    overflow-y: auto;
    height: calc(100vh - 60px);
}

.group-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
}

.group-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-name {
    text-align: center;
    font-size: 18px;
    margin-bottom: 4px;
}

.group-desc {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.info-section {
    margin-bottom: 24px;
}

.info-section h4 {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.member-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.member {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.member:hover {
    background-color: var(--secondary-color);
}

.member .name {
    margin-left: 12px;
    font-size: 15px;
}

.announcement {
    background-color: var(--secondary-color);
    padding: 12px;
    border-radius: 8px;
}

.announcement p {
    font-size: 14px;
    margin-bottom: 4px;
}

.announcement .time {
    font-size: 12px;
    color: var(--text-secondary);
}

.info-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Emoji 选择器样式 */
.emoji-picker {
    position: absolute;
    bottom: 80px;
    left: 520px;
    width: 300px;
    background-color: var(--bg-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    display: none;
}

.emoji-picker.show {
    display: block;
}

.emoji-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.emoji-header h4 {
    font-size: 14px;
    font-weight: 600;
}

.emoji-categories {
    display: flex;
    justify-content: space-around;
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
}

.emoji-categories button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.emoji-categories button.active {
    background-color: var(--secondary-color);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.emoji-grid button {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.emoji-grid button:hover {
    background-color: var(--secondary-color);
    transform: scale(1.2);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .sidebar {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        display: none;
    }

    .sidebar.show {
        display: flex;
    }

    .main-chat {
        display: none;
    }

    .main-chat.show {
        display: flex;
    }
}
/* 文件上传区域样式 */
.file-upload-area {
    position: relative;
    width: 180px;
    height: 100px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 10px;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 132, 255, 0.05);
}

.upload-icon {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.upload-text {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 4px;
    text-align: center;
}

.upload-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 文件预览样式 */
.file-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

/* 上传进度条 */
.upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(0, 132, 255, 0.2);
    display: none;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s;
}

/* 移除按钮 */
.remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    display: none;
}

.remove-file:hover {
    background-color: rgba(0, 0, 0, 0.7);
}
/* 文件消息样式 - 保持原有风格 */
.file-message {
    padding: 8px 12px;
    background-color: var(--message-sent);
    color: var(--message-sent-text);
    border-radius: 18px;
    border-top-right-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-icon {
    font-size: 20px;
}

.file-name {
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 14px;
}

.file-size {
    font-size: 11px;
    opacity: 0.8;
}

.download-btn {
    color: inherit;
    margin-left: 12px;
    font-size: 13px;
    text-decoration: underline;
    opacity: 0.8;
}

.download-btn:hover {
    opacity: 1;
}
/* 修改消息样式 */
.message {
    display: flex;
    margin-bottom: 16px;
    position: relative;
}

/* 接收的消息保持原有气泡样式在左侧 */
.message.received {
    justify-content: flex-start;
}

.message.received .message-content {
    margin-left: 12px;
    border-radius: 18px;
    border-top-left-radius: 0;
    padding: 8px 12px;
    max-width: 70%;
}

/* 发送的消息改为无气泡样式，头像在右侧 */
.message.sent {
    justify-content: flex-end;
}

.message.sent .message-content {
    order: 1;
    margin-right: 12px;
    background-color: transparent;
    padding: 0;
    max-width: 70%;
}

.message.sent .avatar {
    order: 2;
}

/* 文件消息样式调整 */
.file-message {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    background-color: #f5f7fa;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-icon {
    font-size: 20px;
    color: #0084ff;
}

.file-name {
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 14px;
}

.file-size {
    font-size: 11px;
    color: #65676b;
}

.download-btn {
    color: #0084ff;
    margin-left: 12px;
    font-size: 13px;
    text-decoration: underline;
}
/* 消息内容样式 */
.message-text {
    padding: 22px 22px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.2;
    font-size: 18px;
    margin:0 auto;
    word-break: break-word;
}

/* 图片消息样式 */
.message-media {
    max-width: 80%;
}

.message-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.message-image:hover {
    opacity: 0.9;
}

.image-caption {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 文件消息样式 */
.message-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    max-width: 300px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 24px;
    color: var(--primary-color);
}

.file-name {
    font-weight: 500;
    font-size: 14px;
}

.file-size {
    font-size: 12px;
    color: var(--text-secondary);
}

.download-btn {
    color: var(--primary-color);
    font-size: 13px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    background: rgba(0, 132, 255, 0.1);
}

.download-btn:hover {
    background: rgba(0, 132, 255, 0.2);
}

/* Emoji消息样式 */
.message-emoji {
    font-size: 48px;
    line-height: 1;
    padding: 10px;
}
/* 选中状态 */
.active-dom {
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);  /* 蓝色阴影增强 */
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important; /* 更深的蓝色渐变 */
    border-left: 4px solid #1976d2;  /* 更深的蓝色边框 */
    transform: scale(1.02);
    position: relative;
    z-index: 1;
}
/* 基础消息文本样式 */

.message-text:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}/* 接收方消息（浅色） */
.message-incoming .message-text {
    background-color: #ffffff;
    border-top-left-radius: 4px;
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;
    border-top-right-radius: 20px;
    margin-right: auto;
    border: 1px solid #e9ecef;
}

/* 发送方消息（深色） */
.message-outgoing .message-text {
    background-color: #007bff;
    color: white;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 20px;
    border-bottom-left-radius: 20px;
    border-top-left-radius: 20px;
    margin-left: auto;
    box-shadow: 0 2px 4px rgba(0,123,255,0.2);
}

/* 发送方链接样式 */
.message-outgoing .message-text a {
    color: #cce5ff;
    text-decoration: underline;
}
/* Emoji消息样式 */
.message-text.has-emoji {
    font-size: 20px;
    line-height: 1.8;
    padding: 10px 15px;
}

/* 纯数字消息 */
.message-text.only-numbers {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    letter-spacing: 0.5px;
    padding: 12px 18px;
    background-color: #f1f3f5;
}

/* 链接样式 */
.message-text a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid rgba(0,123,255,0.3);
    transition: all 0.2s ease;
}

.message-text a:hover {
    color: #0056b3;
    border-bottom-color: rgba(0,86,179,0.5);
}
/* 代码块样式 */
.message-text pre {
    background-color: rgba(0,0,0,0.03);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 14px;
    line-height: 1.4;
    margin: 8px 0;
    border: 1px solid #e9ecef;
}

/* 引用样式 */
.message-text blockquote {
    border-left: 3px solid #dee2e6;
    padding-left: 12px;
    margin: 8px 0;
    color: #6c757d;
    font-style: italic;
}
/* 消息时间戳 */
.message-meta {
    font-size: 12px;
    color: #adb5bd;
    margin-top: 4px;
    display: flex;
    align-items: center;
}

.message-outgoing .message-meta {
    justify-content: flex-end;
    color: rgba(255,255,255,0.7);
}

/* 已读状态 */
.message-status {
    margin-left: 6px;
    font-size: 14px;
}

.message-status.read {
    color: #4dabf7;
}
/* 新消息动画 */
@keyframes messageIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-new {
    animation: messageIn 0.3s ease-out forwards;
}
/* Emoji 选择器容器 */
.emoji-picker {
    width: 280px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: none; /* 默认隐藏，通过JS控制显示 */
    position: absolute;
    z-index: 1000;
}

/* 头部样式 */
.emoji-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.emoji-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    font-size: 16px;
}

.btn-icon:hover {
    color: #333;
}

/* 分类标签 */
.emoji-categories {
    display: flex;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.emoji-categories button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    font-size: 18px;
    color: #666;
    border-radius: 4px;
    flex: 1;
    display: flex;
    justify-content: center;
}

.emoji-categories button.active {
    color: #1a73e8;
    background-color: #f0f6ff;
}

.emoji-categories button:hover {
    background-color: #f5f5f5;
}

/* 表情网格 */
.emoji-grid {
    padding: 8px;
    height: 200px;
    overflow-y: auto;
}

.emoji-group {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.emoji-group button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.emoji-group button:hover {
    background-color: #f5f5f5;
    transform: scale(1.1);
}
/* 表情网格 - 优化版 */
.emoji-grid {
    padding: 12px;
    height: 240px;
    overflow-y: auto;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #e0e0e0 transparent; /* Firefox */
}

/* Chrome/Safari滚动条样式 */
.emoji-grid::-webkit-scrollbar {
    width: 6px;
}

.emoji-grid::-webkit-scrollbar-track {
    background: transparent;
}

.emoji-grid::-webkit-scrollbar-thumb {
    background-color: #e0e0e0;
    border-radius: 3px;
}

/* 表情组布局 */
.emoji-group {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* 每行7个表情 */
    gap: 8px;
    padding-bottom: 12px;
}

/* 表情按钮样式 */
.emoji-group button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

/* 表情悬停效果 */
.emoji-group button:hover {
    background-color: #f0f2f5;
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* 表情激活效果 */
.emoji-group button:active {
    transform: scale(0.95);
}

/* 解决布局错位问题 */
.emoji-group::after {
    content: "";
    display: block;
    clear: both;
}

/* 确保所有表情组初始隐藏 */
.emoji-group:not([data-group="smile"]) {
    display: none;
}
/* 加载状态 - 更美观的样式 */
.btn-send[data-loading="true"] {
    opacity: 0.8;
    cursor: progress; /* 鼠标变为加载状态 */
    background-color: var(--primary-color);
}

/* 加载动画（平滑旋转的圆环 + 渐变色） */
.btn-send[data-loading="true"]::after {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: white;
    background-color: var(--primary-color);
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 加载时隐藏按钮文字（可选） */
.btn-send[data-loading="true"] span {
    opacity: 0;
    transition: opacity 0.3s;
}